package muse.frames;

import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import muse.Frame;
import muse.widgets.ChatBubbleWidget;
import muse.widgets.JournalWidget;
import muse.widgets.MuseWidget;
import muse.widgets.TextboxWidget;

public class Portal extends Frame {
	public Portal() {
            
            /*
		// Add the Journal
		JournalWidget jw = new JournalWidget();
		addLayer(jw, 0);
		jw.setLocation(200,80);
		
		// Add the two textboxes
		TextboxWidget tw1 = new TextboxWidget();
		addLayer(tw1,1);
		tw1.setLocation(20,180);
		
		TextboxWidget tw2 = new TextboxWidget();
		addLayer(tw2,2);
		tw2.setLocation(120,290);
		
		// Add the MUSE graphic
		MuseWidget mw = new MuseWidget();
		addLayer(mw,3);
		mw.setLocation(20,300);
                
                */
                
                this.setLayout(new BorderLayout());
                JPanel all = new JPanel();
                
                all.setLayout(new GridBagLayout());
                GridBagConstraints c = new GridBagConstraints(); 
                
                ChatBubbleWidget chatBubbleWidget = new ChatBubbleWidget();
                JournalWidget journalWidget = new JournalWidget();
                MuseWidget museWidget = new MuseWidget();
                TextboxWidget textBoxWidget = new TextboxWidget();
                
                
                JPanel chatBubblePanel = new JPanel();
                JPanel journalPanel = new JPanel();
                JPanel textBoxPanel = new JPanel();
                JPanel musePanel = new JPanel();
                
                //chatBubblePanel.setBorder(BorderFactory.createLineBorder(Color.blue));
                chatBubblePanel.setBackground(null);
                chatBubblePanel.setLayout(new BorderLayout());
                chatBubblePanel.add(chatBubbleWidget, "South");
                
                //journalPanel.setBorder(BorderFactory.createLineBorder(Color.red));
                journalPanel.setBackground(null);
                journalPanel.setLayout(new BorderLayout());
                journalPanel.add(journalWidget, "South");
                
                //textBoxPanel.setBorder(BorderFactory.createLineBorder(Color.green));
                textBoxPanel.setBackground(null);
                textBoxPanel.add(textBoxWidget);
                
                //musePanel.setBorder(BorderFactory.createLineBorder(Color.black));
                musePanel.setBackground(null);
                musePanel.add(museWidget);
                
                c.fill = GridBagConstraints.BOTH;
                c.gridwidth = 1;
                c.gridheight = 1;
                c.gridx = 0;
                c.gridy = 0;
                c.ipadx = 0;
                c.ipady = 0;
                c.weightx = 0.40;
                c.weighty = 0.50;
                c.insets = new Insets(5, 5, 5, 5);
                all.add(chatBubblePanel, c);
                
                c.fill = GridBagConstraints.BOTH;
                c.gridwidth = 1;
                c.gridheight = 1;
                c.gridx = 1;
                c.gridy = 1;
                c.ipadx = 0;
                c.ipady = 0;
                c.weightx = 0.60;
                c.weighty = 0.30;
                c.insets = new Insets(5, 5, 5, 5);
                all.add(journalPanel, c);
                
                c.fill = GridBagConstraints.BOTH;
                c.gridwidth = 1;
                c.gridheight = 1;
                c.gridx = 0;
                c.gridy = 1;
                c.ipadx = 0;
                c.ipady = 0;
                c.weightx = 0.40;
                c.weighty = 0.30;
                c.insets = new Insets(5, 5, 5, 5);
                all.add(musePanel, c);
                
                c.fill = GridBagConstraints.BOTH;
                c.gridwidth = 2;
                c.gridheight = 1;
                c.gridx = 0;
                c.gridy = 2;
                c.ipadx = 0;
                c.ipady = 0;
                c.weightx = 1.00;
                c.weighty = 0.2;
                c.insets = new Insets(5, 5, 5, 5);
                all.add(textBoxPanel, c);
                
                all.setBackground(Color.gray);
                this.add(all);
                
	}
}
